package com.mrjy.maintain.dao;

import java.util.List;

import com.mrjy.common.entity.PromoteDetail;
import com.mrjy.maintain.dto.PromoteDetailDTO;

/**
 * 推广明细 dao层 
 * @author csshui
 *
 */
public interface IPromoteDetailDao {
	
	PromoteDetail queryPromoteDetailByPaymentId(PromoteDetailDTO paramDTO);
	
	PromoteDetail queryLastPromoterByUserId(PromoteDetailDTO paramDTO);
	
	int insert(PromoteDetail info);
	
	List<PromoteDetailDTO> queryPromoteDetailList(PromoteDetailDTO dto);
	
	//更新结算状态
	int updateSettleStatus(PromoteDetail info);
	
	List<PromoteDetailDTO> queryPromoteDetailListByRecommendId(PromoteDetailDTO dto);
	
	List<PromoteDetailDTO> queryPromoterMoneyListByRecommendId(PromoteDetailDTO dto);
	
	List<PromoteDetailDTO> queryTeanMemberDetailListByDistributorIdAndRecommendId(PromoteDetailDTO dto);
	
	PromoteDetailDTO queryTeanMemberTotalMoneyByDistributorIdAndRecommendId(PromoteDetailDTO dto);

	List<PromoteDetailDTO> queryPromoteDetailPageForBack(PromoteDetailDTO dto);
	PromoteDetailDTO queryTotalMoneyPromoteForBack(PromoteDetailDTO dto);
	
	PromoteDetailDTO querySumMoneyByRecommendId(PromoteDetailDTO dto);
	
	PromoteDetailDTO queryTeamSumMoneyByRecommendId(PromoteDetailDTO dto);
	
	List<PromoteDetailDTO> queryTeamDetailListByRecommendId(PromoteDetailDTO dto);
	
	List<PromoteDetailDTO> queryDistributorDetailListByDistributorId(PromoteDetailDTO paramDTO);
	
	List<PromoteDetailDTO> queryPartnerPromoteDetailByPaymentId(Integer paymentId);

	PromoteDetail selectById(int id);
	
	List<PromoteDetail> checkPromoteDetailIsNotSettle();

	int updateSettleStatusById(PromoteDetail info);

	PromoteDetail queryNotSettleById(Integer id);

	List<PromoteDetail> checkDailyPromoteDetailIsNotSettle();

	List<PromoteDetail> queryDailyPromoteDetailByRecommentId(Integer recommendId);

	PromoteDetailDTO queryTeamSumMoneyCostByRecommendId(PromoteDetailDTO dto);

	PromoteDetailDTO countFirstAndSecondPromote(PromoteDetailDTO dto);

	List<PromoteDetailDTO> queryFirstPromoterList(PromoteDetailDTO dto);

	List<PromoteDetailDTO> querySecondPromoterList(PromoteDetailDTO dto);
}